<form class="form-horizontal" id="tradeTypeDetailForm">

    <div class="box-body">
        <div class="form-group required">
            <label for="mch_id" class="col-sm-3 control-label form-required">商户ID：</label>
            <div class="col-sm-8">
                <input type="text" th:value="${tradeType.mch_id}" class="form-control" name="mch_id" id="mch_id" require="必填项" readonly="readonly"  placeholder="" />
            </div>
        </div>
        <div class="form-group required">
            <label for="tradeType" class="col-sm-3 control-label form-required">类型名称：</label>
            <div class="col-sm-8">
                <input type="text" th:value="${tradeType.tradeType}" class="form-control" name="tradeType" id="tradeType" require="必填项" readonly="readonly"  placeholder="" />
            </div>
        </div>
        <div class="form-group required">
            <label for="rate" class="col-sm-3 control-label form-required">费率：</label>
            <div class="col-sm-8">
                <input type="text" th:value="${tradeType.rate}" class="form-control" name="rate" id="rate" require="必填项"  placeholder="" />
            </div>
        </div>

<!--        <div class="form-group required">-->
<!--            <label for="name" class="col-sm-3 control-label form-required">上游商户号：</label>-->
<!--            <div class="col-sm-8">-->
<!--                <select name="name" class="form-control" require="必选项">-->
<!--                    <option value="">&#45;&#45;请选择&#45;&#45;</option>-->
<!--                    <option th:each="c:${channels}" th:value="${c.merchantNo}" th:text="${c.channelName}"></option>-->
<!--                </select>-->
<!--            </div>-->
<!--        </div>-->

        <div class="form-group">
            <label class="col-sm-3 control-label">状态 :</label>
            <div class="col-sm-8">
                <select name="status" class="form-control" requireZero="必填项">
                    <option th:selected="${tradeType.status==0}" value="0">禁用</option>
                    <option th:selected="${tradeType.status==1}" value="1">启用</option>
                </select>
            </div>
        </div>

    </div>
    <!-- /.box-body -->
    <div class="box-footer">
        <div class="pull-right">
            <button type="button" id="saveDetailTradeType" class="btn btn-info">确定</button>
            <button type="button" data-dismiss="modal" class="btn btn-default">取消</button>
        </div>
    </div>
    <!-- /.box-footer -->
</form>

<script>
    $(function () {
        $("#saveDetailTradeType").on('click', function () {
            if(doValidForm(tradeTypeDetailForm)){
                Core.mask("#saveDetailTradeType");
                Core.postAjax(ctxPath + "/tradeType/edit",$("#tradeTypeDetailForm").serialize(),function (data) {
                    Core.unmask("#saveDetailTradeType");
                    if(data.code==200){
                        $("#tradeTypeDetailModal").modal("hide");
                        Core.refreshJqTable("#table_list",true);
                    }
                    layer.msg(data.msg);
                })
            }
        })
    });
</script>